package com.iplant.ams.service.basicenum.dms.scada;


import com.iplant.base.po.enums.BaseEnum;

/**
 * 采集模式
 */
public enum DMSDataActions implements BaseEnum {
    /**
     * 默认
     */
    Default(0, "默认"),

    /**
     * 可读
     */
    ReadOnly(1, "可读"),
    /**
     * 可写
     */
    WriteOnly(2, "可写"),
    /**
     * 可读可写
     */
    ReadWrite(3, "可读可写"),
    /**
     * 实时监听
     */
    Monitor(4, "实时监听"),
    /**
     * 轮询采集
     */
    Sample(5, "轮询采集");

    private int value;
    private String label;
    private String remark = "";

    DMSDataActions(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public static DMSDataActions getEnumType(int val) {
        for (DMSDataActions type : DMSDataActions.values()) {
            if (type.getValue() == val) {
                return type;
            }
        }
        return Default;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public void setValue(int value) {
        this.value = value;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }
}
